package com.zw.design.pattern.creational.structural.decorator.v2;

/****
 * 装饰者聚合类
 * 是否是抽象类 需要看具体业务
 */
public abstract class AbstractDecorator extends ABattercake {

    private ABattercake aBattercake;

    public AbstractDecorator(ABattercake aBattercake){
        this.aBattercake=aBattercake;
    }
    //如果是抽象方法 子类必须去重写改方法
    public abstract  void doSingle();


    @Override
    protected String getDesc() {
        return this.aBattercake.getDesc();
    }

    @Override
    protected int cost() {
        return this.aBattercake.cost();
    }
}
